Termination w.r.t. Q of the following Term Rewriting System could not be shown:

Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(and(tt, X)) → mark(X)
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(s(length(L)))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.


QTRS
  ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(and(tt, X)) → mark(X)
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(s(length(L)))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(and(tt, X)) → mark(X)
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(s(length(L)))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

active(and(tt, X)) → mark(X)
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(active(x1)) = x1   
POL(and(x1, x2)) = 2·x1 + 2·x2   
POL(cons(x1, x2)) = x1 + x2   
POL(length(x1)) = 2·x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(proper(x1)) = x1   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 2·x1 + 2·x2   
POL(top(x1)) = x1   
POL(tt) = 2   
POL(zeros) = 0   




↳ QTRS
  ↳ RRRPoloQTRSProof
QTRS
      ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(s(length(L)))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(s(length(L)))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

active(take(0, IL)) → mark(nil)
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(active(x1)) = x1   
POL(and(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = x1 + x2   
POL(length(x1)) = 2·x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(proper(x1)) = x1   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 1 + x1 + x2   
POL(top(x1)) = x1   
POL(tt) = 0   
POL(zeros) = 0   




↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
QTRS
          ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

active(length(nil)) → mark(0)
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(active(x1)) = x1   
POL(and(x1, x2)) = 2·x1 + x2   
POL(cons(x1, x2)) = x1 + x2   
POL(length(x1)) = x1   
POL(mark(x1)) = x1   
POL(nil) = 1   
POL(ok(x1)) = x1   
POL(proper(x1)) = x1   
POL(s(x1)) = x1   
POL(take(x1, x2)) = x1 + 2·x2   
POL(top(x1)) = x1   
POL(tt) = 1   
POL(zeros) = 0   




↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
QTRS
              ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

S(ok(X)) → S(X)
ACTIVE(length(cons(N, L))) → S(length(L))
CONS(mark(X1), X2) → CONS(X1, X2)
LENGTH(ok(X)) → LENGTH(X)
PROPER(take(X1, X2)) → TAKE(proper(X1), proper(X2))
ACTIVE(take(X1, X2)) → ACTIVE(X2)
TOP(mark(X)) → PROPER(X)
ACTIVE(take(X1, X2)) → TAKE(X1, active(X2))
ACTIVE(and(X1, X2)) → AND(active(X1), X2)
ACTIVE(cons(X1, X2)) → CONS(active(X1), X2)
ACTIVE(length(cons(N, L))) → LENGTH(L)
AND(ok(X1), ok(X2)) → AND(X1, X2)
TOP(ok(X)) → ACTIVE(X)
ACTIVE(length(X)) → ACTIVE(X)
PROPER(and(X1, X2)) → AND(proper(X1), proper(X2))
PROPER(s(X)) → PROPER(X)
PROPER(cons(X1, X2)) → PROPER(X1)
ACTIVE(zeros) → CONS(0, zeros)
PROPER(take(X1, X2)) → PROPER(X2)
PROPER(length(X)) → LENGTH(proper(X))
PROPER(cons(X1, X2)) → PROPER(X2)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
LENGTH(mark(X)) → LENGTH(X)
ACTIVE(take(X1, X2)) → ACTIVE(X1)
TOP(ok(X)) → TOP(active(X))
TAKE(ok(X1), ok(X2)) → TAKE(X1, X2)
S(mark(X)) → S(X)
PROPER(cons(X1, X2)) → CONS(proper(X1), proper(X2))
CONS(ok(X1), ok(X2)) → CONS(X1, X2)
ACTIVE(take(s(M), cons(N, IL))) → CONS(N, take(M, IL))
PROPER(and(X1, X2)) → PROPER(X1)
ACTIVE(length(X)) → LENGTH(active(X))
ACTIVE(take(X1, X2)) → TAKE(active(X1), X2)
PROPER(length(X)) → PROPER(X)
PROPER(s(X)) → S(proper(X))
ACTIVE(take(s(M), cons(N, IL))) → TAKE(M, IL)
ACTIVE(and(X1, X2)) → ACTIVE(X1)
TAKE(X1, mark(X2)) → TAKE(X1, X2)
PROPER(and(X1, X2)) → PROPER(X2)
AND(mark(X1), X2) → AND(X1, X2)
PROPER(take(X1, X2)) → PROPER(X1)
ACTIVE(s(X)) → ACTIVE(X)
TOP(mark(X)) → TOP(proper(X))
TAKE(mark(X1), X2) → TAKE(X1, X2)
ACTIVE(s(X)) → S(active(X))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
QDP
                  ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

S(ok(X)) → S(X)
ACTIVE(length(cons(N, L))) → S(length(L))
CONS(mark(X1), X2) → CONS(X1, X2)
LENGTH(ok(X)) → LENGTH(X)
PROPER(take(X1, X2)) → TAKE(proper(X1), proper(X2))
ACTIVE(take(X1, X2)) → ACTIVE(X2)
TOP(mark(X)) → PROPER(X)
ACTIVE(take(X1, X2)) → TAKE(X1, active(X2))
ACTIVE(and(X1, X2)) → AND(active(X1), X2)
ACTIVE(cons(X1, X2)) → CONS(active(X1), X2)
ACTIVE(length(cons(N, L))) → LENGTH(L)
AND(ok(X1), ok(X2)) → AND(X1, X2)
TOP(ok(X)) → ACTIVE(X)
ACTIVE(length(X)) → ACTIVE(X)
PROPER(and(X1, X2)) → AND(proper(X1), proper(X2))
PROPER(s(X)) → PROPER(X)
PROPER(cons(X1, X2)) → PROPER(X1)
ACTIVE(zeros) → CONS(0, zeros)
PROPER(take(X1, X2)) → PROPER(X2)
PROPER(length(X)) → LENGTH(proper(X))
PROPER(cons(X1, X2)) → PROPER(X2)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
LENGTH(mark(X)) → LENGTH(X)
ACTIVE(take(X1, X2)) → ACTIVE(X1)
TOP(ok(X)) → TOP(active(X))
TAKE(ok(X1), ok(X2)) → TAKE(X1, X2)
S(mark(X)) → S(X)
PROPER(cons(X1, X2)) → CONS(proper(X1), proper(X2))
CONS(ok(X1), ok(X2)) → CONS(X1, X2)
ACTIVE(take(s(M), cons(N, IL))) → CONS(N, take(M, IL))
PROPER(and(X1, X2)) → PROPER(X1)
ACTIVE(length(X)) → LENGTH(active(X))
ACTIVE(take(X1, X2)) → TAKE(active(X1), X2)
PROPER(length(X)) → PROPER(X)
PROPER(s(X)) → S(proper(X))
ACTIVE(take(s(M), cons(N, IL))) → TAKE(M, IL)
ACTIVE(and(X1, X2)) → ACTIVE(X1)
TAKE(X1, mark(X2)) → TAKE(X1, X2)
PROPER(and(X1, X2)) → PROPER(X2)
AND(mark(X1), X2) → AND(X1, X2)
PROPER(take(X1, X2)) → PROPER(X1)
ACTIVE(s(X)) → ACTIVE(X)
TOP(mark(X)) → TOP(proper(X))
TAKE(mark(X1), X2) → TAKE(X1, X2)
ACTIVE(s(X)) → S(active(X))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 8 SCCs with 18 less nodes.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TAKE(ok(X1), ok(X2)) → TAKE(X1, X2)
TAKE(mark(X1), X2) → TAKE(X1, X2)
TAKE(X1, mark(X2)) → TAKE(X1, X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                        ↳ UsableRulesProof
QDP
                            ↳ QDPSizeChangeProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TAKE(ok(X1), ok(X2)) → TAKE(X1, X2)
TAKE(mark(X1), X2) → TAKE(X1, X2)
TAKE(X1, mark(X2)) → TAKE(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(ok(X)) → S(X)
S(mark(X)) → S(X)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
QDP
                            ↳ QDPSizeChangeProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(ok(X)) → S(X)
S(mark(X)) → S(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LENGTH(ok(X)) → LENGTH(X)
LENGTH(mark(X)) → LENGTH(X)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
QDP
                            ↳ QDPSizeChangeProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LENGTH(ok(X)) → LENGTH(X)
LENGTH(mark(X)) → LENGTH(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

AND(mark(X1), X2) → AND(X1, X2)
AND(ok(X1), ok(X2)) → AND(X1, X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
QDP
                            ↳ QDPSizeChangeProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

AND(mark(X1), X2) → AND(X1, X2)
AND(ok(X1), ok(X2)) → AND(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(ok(X1), ok(X2)) → CONS(X1, X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
QDP
                            ↳ QDPSizeChangeProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(ok(X1), ok(X2)) → CONS(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
                      ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PROPER(and(X1, X2)) → PROPER(X2)
PROPER(take(X1, X2)) → PROPER(X1)
PROPER(s(X)) → PROPER(X)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(and(X1, X2)) → PROPER(X1)
PROPER(take(X1, X2)) → PROPER(X2)
PROPER(length(X)) → PROPER(X)
PROPER(cons(X1, X2)) → PROPER(X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
QDP
                            ↳ QDPSizeChangeProof
                      ↳ QDP
                      ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PROPER(and(X1, X2)) → PROPER(X2)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(s(X)) → PROPER(X)
PROPER(take(X1, X2)) → PROPER(X1)
PROPER(and(X1, X2)) → PROPER(X1)
PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(length(X)) → PROPER(X)
PROPER(take(X1, X2)) → PROPER(X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
                      ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(take(X1, X2)) → ACTIVE(X2)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(take(X1, X2)) → ACTIVE(X1)
ACTIVE(and(X1, X2)) → ACTIVE(X1)
ACTIVE(length(X)) → ACTIVE(X)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
QDP
                            ↳ QDPSizeChangeProof
                      ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(take(X1, X2)) → ACTIVE(X2)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(take(X1, X2)) → ACTIVE(X1)
ACTIVE(and(X1, X2)) → ACTIVE(X1)
ACTIVE(length(X)) → ACTIVE(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
QDP
                        ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(X)) → TOP(proper(X))
TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
QDP
                            ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(X)) → TOP(proper(X))
TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
length(mark(X)) → mark(length(X))
length(ok(X)) → ok(length(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule TOP(mark(X)) → TOP(proper(X)) at position [0] we obtained the following new rules:

TOP(mark(tt)) → TOP(ok(tt))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(mark(zeros)) → TOP(ok(zeros))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(nil)) → TOP(ok(nil))
TOP(mark(0)) → TOP(ok(0))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(tt)) → TOP(ok(tt))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(mark(zeros)) → TOP(ok(zeros))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(nil)) → TOP(ok(nil))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(0)) → TOP(ok(0))
TOP(ok(X)) → TOP(active(X))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
length(mark(X)) → mark(length(X))
length(ok(X)) → ok(length(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 4 less nodes.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
QDP
                                    ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(X)) → TOP(active(X))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
length(mark(X)) → mark(length(X))
length(ok(X)) → ok(length(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule TOP(ok(X)) → TOP(active(X)) at position [0] we obtained the following new rules:

TOP(ok(take(s(x0), cons(x1, x2)))) → TOP(mark(cons(x1, take(x0, x2))))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(length(cons(x0, x1)))) → TOP(mark(s(length(x1))))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(ok(zeros)) → TOP(mark(cons(0, zeros)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
QDP
                                        ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(length(cons(x0, x1)))) → TOP(mark(s(length(x1))))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(take(s(x0), cons(x1, x2)))) → TOP(mark(cons(x1, take(x0, x2))))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(zeros)) → TOP(mark(cons(0, zeros)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
length(mark(X)) → mark(length(X))
length(ok(X)) → ok(length(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(zeros)) → TOP(mark(cons(0, zeros)))
The remaining pairs can at least be oriented weakly.

TOP(ok(length(cons(x0, x1)))) → TOP(mark(s(length(x1))))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(take(s(x0), cons(x1, x2)))) → TOP(mark(cons(x1, take(x0, x2))))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(active(x1)) = 1   
POL(and(x1, x2)) = 0   
POL(cons(x1, x2)) = 0   
POL(length(x1)) = 0   
POL(mark(x1)) = 0   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(proper(x1)) = 0   
POL(s(x1)) = 0   
POL(take(x1, x2)) = 0   
POL(tt) = 0   
POL(zeros) = 1   

The following usable rules [17] were oriented:

s(mark(X)) → mark(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
length(mark(X)) → mark(length(X))
s(ok(X)) → ok(s(X))
take(X1, mark(X2)) → mark(take(X1, X2))
take(mark(X1), X2) → mark(take(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
length(ok(X)) → ok(length(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ QDPOrderProof
QDP
                                            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(length(cons(x0, x1)))) → TOP(mark(s(length(x1))))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(take(s(x0), cons(x1, x2)))) → TOP(mark(cons(x1, take(x0, x2))))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
length(mark(X)) → mark(length(X))
length(ok(X)) → ok(length(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(length(cons(x0, x1)))) → TOP(mark(s(length(x1))))
The remaining pairs can at least be oriented weakly.

TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(take(s(x0), cons(x1, x2)))) → TOP(mark(cons(x1, take(x0, x2))))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(active(x1)) = 0   
POL(and(x1, x2)) = 0   
POL(cons(x1, x2)) = 0   
POL(length(x1)) = 1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(proper(x1)) = 0   
POL(s(x1)) = 0   
POL(take(x1, x2)) = 0   
POL(tt) = 0   
POL(zeros) = 0   

The following usable rules [17] were oriented:

s(mark(X)) → mark(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
length(mark(X)) → mark(length(X))
s(ok(X)) → ok(s(X))
take(X1, mark(X2)) → mark(take(X1, X2))
take(mark(X1), X2) → mark(take(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
length(ok(X)) → ok(length(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
QDP
                                                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(take(s(x0), cons(x1, x2)))) → TOP(mark(cons(x1, take(x0, x2))))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
length(mark(X)) → mark(length(X))
length(ok(X)) → ok(length(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(take(s(x0), cons(x1, x2)))) → TOP(mark(cons(x1, take(x0, x2))))
The remaining pairs can at least be oriented weakly.

TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(active(x1)) = x1   
POL(and(x1, x2)) = 0   
POL(cons(x1, x2)) = 0   
POL(length(x1)) = 1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(proper(x1)) = x1   
POL(s(x1)) = 1   
POL(take(x1, x2)) = x1   
POL(tt) = 0   
POL(zeros) = 0   

The following usable rules [17] were oriented:

s(mark(X)) → mark(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
length(mark(X)) → mark(length(X))
s(ok(X)) → ok(s(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
take(X1, mark(X2)) → mark(take(X1, X2))
take(mark(X1), X2) → mark(take(X1, X2))
proper(tt) → ok(tt)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(length(X)) → length(proper(X))
proper(zeros) → ok(zeros)
proper(0) → ok(0)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
length(ok(X)) → ok(length(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
QDP

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
length(mark(X)) → mark(length(X))
length(ok(X)) → ok(length(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.